<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>

<!DOCTYPE html>
<script href="/res/layui/lay/layui,js"></script>
<html>
<body onload="load();">

</body>
<script>
    function myfun() {
        location.href = "/index";
    }

    /*用window.onload调用myfun()*/

    // 不要括号
    window.onload = myfun;
</script>
</html>
